﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<ShareB.Models.ProfilePublishersModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	ViewPublisherByID
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>ViewPublisherByID</h2>

    <fieldset>
        <legend>Information</legend>
        
        <table>
        <tr><td>
        <div class="display-label">UserID</div>
        </td><td>
        <div class="display-field"><%: Model.UserID %></div>
        </td></tr>

        <tr><td>
        <div class="display-label">UserName</div>
        </td><td>
        <div class="display-field"><%: Model.UserName %></div>
        </td></tr>

        <tr><td>
        <div class="display-label">Email</div>
        </td><td>
        <div class="display-field"><%: Model.Email %></div>
        </td></tr>

        </table>
    </fieldset>
    
    <fieldset>
        <legend>Publications</legend>
        <table>
        <% foreach (var item in Model.Publications)
               { %>
                                   
                    <!-- Hidden fields to preserve information -->
                    <%: Html.HiddenFor(model => Model.UserID)%>
                    <%: Html.HiddenFor(model => Model.UserName)%>
                    <%: Html.HiddenFor(model => Model.Email)%>
                    <%: Html.HiddenFor(model => item.Classif)%>
                    <tr>
                    <td>
                    <div class="display-label">
                         <%: Html.ActionLink(item.Tittle, "ViewPublisherPublication", new { id = item.PublicationID })%>                    
                    </div>
                    </td>
                    </tr>

            <% } %>
        </table>
        
    </fieldset>
    
    <p>
        <%: Html.ActionLink("Back to List", "ListPublishers", "User")%>
    </p>

</asp:Content>

